package com.dondedesigns.eh.controller.bullets;

import java.util.List;
import java.util.TreeSet;

import com.dondedesigns.eh.persistence.BlUser;
import com.dondedesigns.eh.persistence.Bullet;
import com.dondedesigns.eh.persistence.dao.BlUserDAO;
import com.opensymphony.xwork2.ActionSupport;

public class BulletDetails extends ActionSupport {
	private String blUserId;
	private TreeSet<Bullet> bullets;
	private BlUserDAO blUserDAO;

	@Override
	public String execute() throws Exception {
		BlUser blUser = blUserDAO.find(Long.valueOf(blUserId));
		bullets = new TreeSet<Bullet> (blUser.getBullets());
		return SUCCESS;
	}
	
	public void setBlUserId(String blUserId) {
		this.blUserId = blUserId;

	}
	
	public TreeSet<Bullet> getBullets() {
		return bullets;
	}

	public void setBlUserDAO(BlUserDAO blUserDAO) {
		this.blUserDAO = blUserDAO;
	}
}
